home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 23
/
Amiga Format AFCD23 (Feb 1998, Issue 107).iso
/
-seriously_amiga-
/
shareware
/
programming
/
blitz
/
efmuilibsrc
/
blitzlibs
/
userlibs
/
efmuilib.asc
Wrap
Text File
|
1997-12-06
|
70KB
|
2,838 lines
;**************************************************
;* *
;* EFMUILib Version 1.0 *
;* *
;* (c) 1997 by VIVID Imagination *
;**************************************************
;
;Commands list:
;~~~~~~~~~~~~~~
;
;MUISetMaximumTags max
;
;MUIApplicationTitle title$
;MUIApplicationVersion version$
;MUIApplicationCopyright copyright$
;MUIApplicationAuthor author$
;MUIApplicationDescription description$
;MUIApplicationBase base$
;MUIAddApplicationTags &TagList | Tag,Value [,Tag,Value...]
;MUICreateApplication
;MUIRemoveApplication
;MUIApplicationLoc
;MUIApplicationObj To MUIObject#
;MUIAddSubWindow MUIObject#
;
;MUIFreeObject MUIObject#
;
;MUICreateWindow MUIObject#,title$ [,id$ [,MUIObject#] ]
;MUIOpenWindow MUIObject#
;MUICloseWindow MUIObject#
;
;MUIObjLoc (MUIObject#)
;
;MUIRequest To MUIObject#,Flags,Title$,Gadgets$,Format$ [,Param...]
;
;MUIAddTags MUIObject#,&TagList | MUIObject#,Tag,Value [,Tag,Value...]
;
;MUINewObject MUIObject#,Class$,&TagList | MUIObject#,Class$,Tag,Value [,Tag,Value...]
;MUIMakeObject MUIObject#,Type,&TagList | MUIObject#,Type,Tag,Value [,Tag,Value...]
;
;MUIHVSpace MUIObject#
;MUIHSpace MUIObject#,x
;MUIVSpace MUIObject#,x
;MUIString MUIObject#,Contents$,MaxLen
;MUIKeyString MUIObject#,Contents,MaxLen,ControlChar$
;MUICheckMark MUIObject#,Selected
;MUIKeyCheckMark MUIObject#,Selected,ControlChar$
;MUISimpleButton MUIObject#,Name$
;MUIKeyButton MUIObject#,Name$,Key$
;MUICycle MUIObject#, Entry$ [,Entry$...] | *Array
;MUIKeyCycle MUIObject#,Key$, Entry$ [,Entry$...] | *Array
;MUIRadio MUIObject#,Name$, Entry$ [,Entry$...] | *Array
;MUIKeyRadio MUIObject#,Key$,Name$, Entry$ [,Entry$...] | *Array
;MUISlider MUIObject#,Min,Max,Level
;MUIKeySlider MUIObject#,Min,Max,Level,Key$
;MUILabel MUIObject#,Label$,Flags
;MUINumericButton MUIObject#,Format$,Min,Max
;MUIList MUIObject#,MaxEntries,Columns,Format$ [,*Array | Entry$ [,Entry$...]]
;MUIListview To MUIObject#,MUIObject#
;MUIPopButton MUIObject#,Image
;MUIImageButton MUIObject#,Shape#
;
;MUIAddObjHGroup To MUIObject#,MUIObject#
;MUICreateHGroup MUIObject#
;MUIAddObjVGroup To MUIObject#,MUIObject#
;MUICreateVGroup MUIObject#
;MUIAddObjPage To MUIObject#,MUIObject#
;MUICreatePage MUIObject# ,Page1$ [,Page2$...] | &Page$(0)
;
;MUIInsertSingle MUIObject#,Position, Entry$ [,Entry$...] | *Array
;MUIRemoveSingle MUIObject#,Position
;MUIRedrawSingle MUIObject#,Position
;MUIListTitle MUIObject#, Title$ [,Title$...] | *Array
;
;MUISet MUIObject#,&TagList | MUIObject#,Attr,Value [,Attr,Value...]
;MUIGet (MUIObject#,Attribute)
;
;MUIDoMethod MUIObject#, Method,Tag [,Tag] | &TagList
;MUINotify MUIObject#,Tag,Value,MUIObject#, Tag [,Tag...] | &TagList
;MUIEvent
;MUIWaitEvent
;
;*************
;*** TO DO ***
;*************
;
; Nothing (atm)
;
;************
;*** BUGS ***
;************
;
; No bugs reported
;
;****************
;*** Lib Init ***
;****************
.libinit:
#bbmuilib=8
!libheader{#bbmuilib,init,0,finit,0}
!dumtoke{"MUIObject","A MUI object",_toke}
!astatement
!args {#long}
!libs
!subs {_setmaxtags,0,0}
!name {"MUISetMaximumTags","max"}
!astatement
!args {#string}
!libs
!subs {_apptitle,0,0}
!name {"MUIApplicationTitle","title$"}
!astatement
!args {#string}
!libs
!subs {_appver,0,0}
!name {"MUIApplicationVersion","ver$"}
!astatement
!args {#string}
!libs
!subs {_appcr,0,0}
!name {"MUIApplicationCopyright","copyright$"}
!astatement
!args {#string}
!libs
!subs {_appauthor,0,0}
!name {"MUIApplicationAuthor","author$"}
!astatement
!args {#string}
!libs
!subs {_appdesc,0,0}
!name {"MUIApplicationDescription","desc$"}
!astatement
!args {#string}
!libs
!subs {_appbase,0,0}
!name {"MUIApplicationBase","base$"}
!astatement
;
!repargs {0,1,#long}
!libs
!subs {_addapptags,0,0}
;
!args {#long}
!libs
!subs {_addapptagsa,0,0}
;
!name {"MUIAddApplicationTags","&TagList | Tag,Value [,Tag,Value...]"}
!acommand {#long}
!args
!libs
!subs {_createapp,0,0}
!name {"MUICreateApplication",""}
!astatement
!args
!libs
!subs {_removeapp,0,0}
!name {"MUIRemoveApplication",""}
!afunction {#long}
!args
!libs
!subs {_apploc,0,0}
!name {"MUIApplicationLoc",""}
!acommand {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_appobj,0,0}
!name {"MUIApplicationObj","To MUIObject#"}
!acommand {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_appwin,0,0}
!name {"MUIAddSubWindow","MUIObject#"}
!astatement
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_freeobj,0,0}
!name {"MUIFreeObject","MUIObject#"}
!acommand {#long}
;
!args {#word,#string,#string,#word}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
!subs {_createwin,0,0}
;
!args {#word,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createwin1,0,0}
;
!args {#word,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createwin2,0,0}
;
!name {"MUICreateWindow","MUIObject#,title$ [,id$ [,MUIObject#]]"}
!acommand {#word}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_openwin,0,0}
!name {"MUIOpenWindow","MUIObject#"}
!acommand {#word}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_closewin,0,0}
!name {"MUICloseWindow","MUIObject#"}
!astatement
;
!repargs {1,1,#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_addobjtags,0,0}
;
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_addobjtagsa,0,0}
;
!name {"MUIAddTags","MUIObject#,&TagList | MUIObject#,Tag,Value [,Tag,Value...]"}
!acommand {#long}
;
!repargs {2,1,#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_muinewobj,0,0}
;
!args {#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_muinewobja,0,0}
;
!name {"MUINewObject","MUIObject#,Class$,&TagList | MUIObject#,Class$,Tag,Value [,Tag,Value...]"}
!acommand {#long}
;
!repargs {2,1,#word,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_muimakeobj,0,0}
;
!args {#word,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_muimakeobja,0,0}
;
!name {"MUIMakeObject","MUIObject#,Type,&TagList | MUIObject#,Type,Tag,Value [,Tag,Value...]"}
!acommand {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_hvspace,0,0}
!name {"MUIHVSpace","MUIObject#"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_hspace,0,0}
!name {"MUIHSpace","MUIObject#,x"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_vspace,0,0}
!name {"MUIVSpace","MUIObject#,x"}
!acommand {#long}
!args {#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_string,0,0}
!name {"MUIString","MUIObject#,Contents$,MaxLen"}
!acommand {#long}
!args {#word,#string,#long,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keystring,0,0}
!name {"MUIKeyString","MUIObject#,Contents$,MaxLen,ControlChar$"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_checkmark,0,0}
!name {"MUICheckMark","MUIObject#,Selected"}
!acommand {#long}
!args {#word,#long,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keycheckmark,0,0}
!name {"MUIKeyCheckMark","MUIObject#,Selected,ControlChar$"}
!acommand {#long}
!args {#word,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_simplebutton,0,0}
!name {"MUISimpleButton","MUIObject#,Name$"}
!acommand {#long}
!args {#word,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keybutton,0,0}
!name {"MUIKeyButton","MUIObject#,Name$,Key$"}
!acommand {#long}
;
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_cyclea,0,0}
;
!repargs {1,1,#word,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_cycle,0,0}
;
!name {"MUICycle","MUIObject#, Entry$ [,Entry$...] | *Array"}
!acommand {#long}
;
!args {#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keycyclea,0,0}
;
!repargs {2,1,#word,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keycycle,0,0}
;
!name {"MUIKeyCycle","MUIObject#,Key$, Entry$ [,Entry$...] | *Array"}
!acommand {#long}
;
!args {#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_radioa,0,0}
;
!repargs {2,1,#word,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_radio,0,0}
;
!name {"MUIRadio","MUIObject#,Name$, Entry$ [,Entry$...] | *Array"}
!acommand {#long}
;
!args {#word,#string,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keyradioa,0,0}
;
!repargs {3,1,#word,#string,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keyradio,0,0}
;
!name {"MUIKeyRadio","MUIObject#,Name$,Key$, Entry$ [,Entry$...] | *Array"}
!acommand {#long}
!args {#word,#long,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_slider,0,0}
!name {"MUISlider","MUIObject#,Min,Max,Level"}
!acommand {#long}
!args {#word,#long,#long,#long,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_keyslider,0,0}
!name {"MUIKeySlider","MUIObject#,Min,Max,Level,Key$"}
!acommand {#long}
!args {#word,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_label,0,0}
!name {"MUILabel","MUIObject#,Label$,Flags"}
!acommand {#long}
!args {#word,#word}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
!subs {_addobjhgroup,0,0}
!name {"MUIAddObjHGroup","To MUIObject#,MUIObject#"}
!acommand {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createhgroup,0,0}
!name {"MUICreateHGroup","MUIObject#"}
!acommand {#long}
!args {#word,#word}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
!subs {_addobjvgroup,0,0}
!name {"MUIAddObjVGroup","To MUIObject#,MUIObject#"}
!acommand {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createvgroup,0,0}
!name {"MUICreateVGroup","MUIObject#"}
!astatement
;
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_muiseta,0,0}
;
!repargs {1,1,#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_muiset,0,0}
;
!name {"MUISet","MUIObject#,&TagList | MUIObject#,Attr,Value [,Attr,Value...]"}
!afunction {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_muiget,0,0}
!name {"MUIGet","(MUIObject#,Attribute)"}
!astatement
;
!repargs {2,1,#word,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_dmethod,0,0}
;
!args {#word,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_dmethoda,0,0}
;
!name {"MUIDoMethod","MUIObject#,Method, Tag [,Tag...] | &TagList"}
!astatement
;
!repargs {4,1,#word,#long,#long,#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
!subs {_notify,0,0}
;
!args {#word,#long,#long,#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd3}
!subs {_notifya,0,0}
;
!name {"MUINotify","MUIObject#,Tag,Value,MUIObject#, Tag [,Tag...] | &TagList"}
!afunction {#long}
!args
!libs
!subs {_event,0,0}
!name {"MUIEvent",""}
!afunction {#long}
!args
!libs
!subs {_waitevent,0,0}
!name {"MUIWaitEvent",""}
!acommand {#long}
!args {#word,#string,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_numbutton,0,0}
!name {"MUINumericButton","MUIObject#,Format$,Min,Max"}
!acommand {#long}
!args {#word,#word}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia2|#pd1}
!subs {_addobjpage,0,0}
!name {"MUIAddObjPage","To MUIObject#,MUIObject#"}
!acommand {#long}
;
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createpagea,0,0}
;
!repargs {1,1,#word,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_createpage,0,0}
;
!name {"MUICreatePage","MUIObject# ,Page1$ [,Page2$...] | &Page$(0)"}
!acommand {#long}
;
!args {#word,#long,#long,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_listb,0,0}
;
!args {#word,#long,#long,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_lista,0,0}
;
!repargs {4,1,#word,#long,#long,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_list,0,0}
;
!name {"MUIList","MUIObject#,MaxEntries,Columns,Format$ [,*Array | Entry$ [,Entry$...]]"}
!acommand {#long}
!args {#word,#word}
!libs {#bbmuilib,#ia3|#pd0,#bbmuilib,#ia0|#pd1}
!subs {_listview,0,0}
!name {"MUIListView","To MUIObject#,MUIObject#"}
!afunction {#long}
!args {#word}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_objloc,0,0}
!name {"MUIObjLoc","(MUIObject#)"}
!acommand {#long}
;
!args {#word,#long,#string,#string,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_request,0,0}
;
!repargs {5,1,#word,#long,#string,#string,#string,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_request,0,0}
;
!name {"MUIRequest","To MUIObject#,Flags,Title$,Gadgets$,Format$ [,Param...]"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_popbutton,0,0}
!name {"MUIPopButton","MUIObject#,Image"}
!acommand {#long}
!args {#word,#word}
!libs {#bbmuilib,#ia3|#pd0,#shapeslib,#ia0|#pd1}
!subs {_imagebutton,0,0}
!name {"MUIImageButton","MUIObject#,Shape#"}
!acommand {#long}
;
!args {#word,#long,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_insertsinglea,0,0}
;
!repargs {2,1,#word,#long,#string}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_insertsingle,0,0}
;
!name {"MUIInsertSingle","MUIObject#,Position, Entry$ [,Entry$...] | *Array"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_removesingle,0,0}
!name {"MUIRemoveSingle","MUIObject#,Position"}
!acommand {#long}
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0}
!subs {_redrawsingle,0,0}
!name {"MUIRedrawSingle","MUIObject#,Position"}
!acommand {#long}
;
!args {#word,#long}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_listtitlea,0,0}
;
!repargs {1,1,#word,#string}
!libs {#bbmuilib,#ia3|#pd0,#intuitionlib,#la6}
!subs {_listtitle,0,0}
;
!name {"MUIListTitle","MUIObject#, Title$ [,Title$...] | *Array"}
_load:!nullsub{0,0,0}
_save:!nullsub{0,0,0}
_use:!nullsub{0,0,0}
_free:!nullsub{_freeobj,0,0}
init:!nullsub{_codeinit,0,0}
finit:!nullsub{_codefinit,0,0}
!libfin{_toke,_load,_save,_use,_free,30,5}
.libfinit
;***************
;*** DEFINES ***
;***************
#_LVOOpenLibrary=-552
#_LVOCloseLibrary=-414
Macro CALLEXEC
MOVEA.l 4,a6
JSR _LVO`1(a6)
End Macro
#_LVOMUI_NewObjectA=-30 ;(class,tags)(a0,a1)
#_LVOMUI_DisposeObject=-36 ;(obj)(a0)
#_LVOMUI_RequestA=-42 ;(app,win,flags,title,gadgets,format,params)(d0,d1,d2,a0,a1,a2,a3)
#_LVOMUI_AllocAslRequest=-48 ;(type,tags)(d0,a0)
#_LVOMUI_AslRequest=-54 ;(req,tags)(a0,a1)
#_LVOMUI_FreeAslRequest=-60 ;(req)(a0)
#_LVOMUI_Error=-66 ;()()
#_LVOMUI_SetError=-72 ;(errnum)(d0)
#_LVOMUI_GetClass=-78 ;(name)(a0)
#_LVOMUI_FreeClass=-84 ;(cl)(a0)
#_LVOMUI_RequestIDCMP=-90 ;(obj,flags)(a0,d0)
#_LVOMUI_RejectIDCMP=-96 ;(obj,flags)(a0,d0)
#_LVOMUI_Redraw=-102 ;(obj,flags)(a0,d0)
#_LVOMUI_CreateCustomClass=-108 ;(base,supername,supermcc,datasize,dispatcher)(a0,a1,a2,d0,a3)
#_LVOMUI_DeleteCustomClass=-114 ;(mcc)(a0)
#_LVOMUI_MakeObjectA=-120 ;(Type,params)(d0,a0)
#_LVOMUI_Layout=-126 ;(obj,l,t,w,h,flags)(a0,d0,d1,d2,d3,d4)
#_LVOMUI_ObtainPen=-156 ;(mri,spec,flags)(a0,a1,d0)
#_LVOMUI_ReleasePen=-162 ;(mri,pen)(a0,d0)
#_LVOMUI_AddClipping=-168 ;(mri,l,t,w,h)(a0,d0,d1,d2,d3)
#_LVOMUI_RemoveClipping=-174 ;(mri,h)(a0,a1)
#_LVOMUI_AddClipRegion=-180 ;(mri,region)(a0,a1)
#_LVOMUI_RemoveClipRegion=-186 ;(mri,region)(a0,a1)
#_LVOMUI_BeginRefresh=-192 ;(mri,flags)(a0,d0)
#_LVOMUI_EndRefresh=-198 ;(mri,flags)(a0,d0)
Macro CALLMUI
MOVEA.l _MUIBase(pc),a6
JSR _LVO`1(a6)
End Macro
Macro MUINAME
Dc.b "muimaster.library",0
End Macro
Macro OPENLIB
LEA `1(pc),a1
MOVEQ #0,d0
!CALLEXEC {OpenLibrary}
MOVE.l d0,`2
End Macro
Macro CLOSELIB
MOVEA.l `1(pc),a1
!CALLEXEC {CloseLibrary}
End Macro
NEWTYPE.MUIObject
adr.l ;0:Address of the object
kind.w ;4:Kind of the object
tagl.l ;6:Address of the taglist
tagp.w ;10:Pointer of the taglist
size.w ;12:Size of the taglist
special.l ;14:Special Info
spesize.w ;18:Special Info size
spe2.l ;20:Special Info 2 (Hook)
spe2size.w ;24:Special Info 2 size
End NEWTYPE ;26:sizeof
#kind_nothing=-1
#kind_app=0
#kind_win=1
#kind_menu=2
#kind_gadget=3
#kind_label=4
#kind_other=5
Macro s
SizeOf.MUIObject\`1(a3)
End Macro
Macro t
SizeOf.MUIObject\`1(a2)
End Macro
Macro u
SizeOf.MUIObject\`1(a0)
End Macro
;************
;*** CODE ***
;************
.
._codeinit:
MOVEM.l d0-d1/a1/a6,-(a7)
LEA muiname(pc),a1
MOVEQ #0,d0
MOVEA.l 4,a6
JSR _LVOOpenLibrary(a6)
MOVE.l d0,_MUIBase
BEQ initerr
MOVE.l #160,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,apptags
BEQ initerr
'ok: MOVE.w #0,apptap
MOVEM.l (a7)+,d0-d1/a1/a6
RTS
._codefinit:
MOVEM.l d0/a1/a6,-(a7)
BSR _removeapp
MOVE.l _MUIBase(pc),d0
BEQ 'nolib
MOVEA.l d0,a1
MOVEA.l 4,a6
JSR _LVOCloseLibrary(a6)
CLR.l _MUIBase
'nolib: MOVEM.l (a7)+,d0/a1/a6
RTS
muiname: Dc.b "muimaster.library",0
Even
.
._setmaxtags:
MOVE.l d0,maxt
RTS
.
._apptitle:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Title,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._appver:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Version,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._appcr:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Copyright,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._appauthor:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Author,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._appdesc:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Description,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._appbase:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d2
ADDA.w d2,a1
MOVE.l #MUIA_Application_Base,(a1)+
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d2
MOVE.w d2,apptap
RTS
._apploc:
MOVE.l #appstruct,d0
RTS
._appobj:
MOVE.l apptags(pc),!s{tagl}
MOVE.w apptap(pc),!s{tagp}
MOVE.l appaddr(pc),!s{adr}
MOVE.w #kind_app,!s{kind}
MOVE.l #160,!s{size}
RTS
._appwin: ;a3=MUIObject=>Window
TST.l !s{adr}
BEQ 'nowin
MOVEQ #0,d0
CMP.w #kind_win,!s{kind}
BNE 'nowin
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d0
ADDA.w d0,a1
MOVE.l #SubWindow,(a1)+
MOVE.l !s{adr},(a1)+
ADDQ.w #8,d0
MOVE.w d0,apptap
MOVE.l #-1,d0
'nowin: RTS
._addapptags:
MOVEA.l apptags(pc),a1
MOVE.w apptap(pc),d0
ADDA.w d0,a1
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
ADDQ.w #4,d0
DBF d7,'loop
MOVE.w d0,apptap
RTS
_addapptagsa: ;d0=&taglist
MOVEA.l d0,a0
BEQ 'notags
MOVEA.l apptags(pc),a1
MOVE.l a1,d0
MOVE.w apptap(pc),d1
ADDA.w d1,a1
'loop: MOVE.l (a0)+,(a1)+
BNE 'loop
SUBA.l d0,a1
MOVE.w d0,apptap
'notags:RTS
._createapp:
LEA appclass(pc),a0
MOVE.l apptags(pc),d0
BEQ 'noapp
MOVEA.l d0,a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,appaddr
BEQ 'noapp
MOVE.l #-1,d0
'noapp: RTS
._removeapp:
MOVE.l appaddr(pc),d0
BEQ 'noapp
MOVEA.l d0,a0
!CALLMUI {MUI_DisposeObject}
CLR.l appaddr
'noapp: RTS
.
_createwin2:
MOVEQ #0,d2
_createwin1:
SUBA.l a0,a0
._createwin: ;d1=title$ d2=id$ a0=MUIObject# (WindowsContents)
TST.l 6(a3)
BEQ 'notl
MOVEA.l 6(a3),a1
MOVE.w 10(a3),d6
ADDA.w d6,a1
MOVE.l #MUIA_Window_Title,(a1)+
MOVE.l d1,d0
MOVE.l -4(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
ADDQ.w #8,d6
TST.l d2
BEQ 'noid
MOVE.l #MUIA_Window_ID,(a1)+
MOVE.l d2,(a1)+
ADDQ.w #8,d6
'noid: TST.l (a0)
BEQ 'noobj
MOVE.l #WindowContents,(a1)+
MOVE.l (a0),(a1)+
ADDQ.w #8,d6
'noobj: MOVEA.l !s{tagl},a1
MOVE.w d6,10(a3)
MOVEQ #0,d0
LEA winclass(pc),a0
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,(a3)
BEQ 'nowin
MOVE.w #kind_win,!s{kind}
MOVE.l #-1,d0
BRA 'nowin
'notl:
TST.l (a0)
BEQ 'nowin
MOVEM.l d1-d2/a2-a3,-(a7)
MOVE.l maxt(pc),d0
LSL.l #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVEM.l (a7)+,d1-d2/a2-a3
MOVE.l d0,6(a3)
BEQ 'nowin
MOVEA.l d0,a1
MOVE.l #MUIA_Window_Title,(a1)+
MOVE.l d1,d0
MOVE.l -4(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
MOVE.l #MUIA_Window_ID,(a1)+
MOVE.l d2,(a1)+
MOVE.l #WindowContents,(a1)+
MOVE.l (a0),(a1)+
MOVE.w #24,10(a3)
MOVEA.l 6(a3),a1
LEA winclass(pc),a0
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,(a3)
BEQ 'nowin
MOVE.w #kind_win,4(a3)
MOVE.l #-1,d0
'nowin:
RTS
._openwin:
MOVE.l a6,_IntuiBase
MOVEQ #0,d0
CMP.w #kind_win,4(a3)
BNE 'nowin
MOVE.l (a3),d0
BEQ 'nowin
MOVE.l #MUIA_Window_Open,d1
MOVEQ #1,d2
BSR _set
MOVE.l #-1,d0
'nowin: RTS
._closewin:
MOVE.l a6,_IntuiBase
MOVEQ #0,d0
CMP.w #kind_win,4(a3)
BNE 'nowin
MOVE.l (a3),d0
BEQ 'nowin
MOVE.l #MUIA_Window_Open,d1
MOVEQ #0,d2
BSR _set
MOVE.l #-1,d0
'nowin: RTS
.
._objloc:
MOVE.l !s{adr},d0
RTS
.
._request: ;(win,flags,&title$,&gadget$,&format$,params)(a3,d1,d2,d3,d4,-12(a2))
MOVEQ #0,d0
TST.l appaddr
BEQ 'noobj
TST.l !s{adr}
BEQ 'noobj
CMP.w #kind_win,!s{kind}
BNE 'noobj
MOVE.l d1,d5
MOVE.l d2,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVEA.l d0,a0
MOVE.l d0,s0
MOVE.l d3,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVEA.l d0,a1
MOVE.l d0,s1
MOVE.l d4,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,s2
MOVE.l !s{adr},d1
MOVE.l d5,d2
SUBA.l a3,a3
TST.w d7
BLE 'noparams
LEA args(pc),a3
MOVE.l a3,d6
SUBQ #1,d7
'loop: MOVE.l -(a2),(a3)+
DBF d7,'loop
MOVE.l #0,(a3)+
MOVEA.l d6,a3
'noparams:
MOVEA.l s2,a2
MOVE.l appaddr(pc),d0
!CALLMUI {MUI_RequestA} ;(app,win,flags,title,gadgets,format,params)(d0,d1,d2,a0,a1,a2,a3)
MOVE.l d0,d5
MOVE.l s0,d0
ALibJsr $cf02
MOVE.l s1,d0
ALibJsr $cf02
MOVE.l s2,d0
ALibJsr $cf02
MOVE.l d5,d0
'noobj: RTS
.
._addobjtags:
TST.l 6(a3)
BEQ 'notl
MOVEA.l 6(a3),a1
MOVE.w 10(a3),d0
ADDA.w d0,a1
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
ADDQ.w #4,d0
DBF d7,'loop
MOVE.w d0,10(a3)
BRA 'nomem
'notl: MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,6(a3)
BEQ 'nomem
MOVE.w #0,10(a3)
MOVEA.l d0,a1
MOVEQ #0,d0
SUBQ #1,d7
'loop1: MOVE.l -(a2),(a1)+
ADDQ.w #4,d0
DBF d7,'loop1
MOVE.w d0,10(a3)
'nomem: RTS
_addobjtagsa:
TST.l !s{tagl}
BEQ 'notl
MOVEA.l !s{tagl},a1
ADDA.w d0,a1
MOVEA.l d1,a0
MOVEA.l (a0),a0
'loop: MOVE.l (a0)+,(a1)+
BNE 'loop
MOVE.l !s{tagl},d0
SUBA.l d0,a1
MOVE.w d0,!s{tagp}
BRA 'nomem
'notl: MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l d1,-(a7)
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l (a7)+,d1
MOVE.l d0,!s{tagl}
BEQ 'nomem
MOVEA.l d0,a1
MOVEA.l d1,a0
MOVEA.l (a0),a0
'loop1: MOVE.l (a0)+,(a1)+
BNE 'loop1
MOVE.l !s{tagl},d0
SUBA.l d0,a1
MOVE.w !s{tagp},d1
ADD.w d0,d1
MOVE.w d1,!s{tagp}
'nomem: RTS
.
._muinewobj:
MOVEA.l d1,a0
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'err
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
SUBQ #1,d7
TST.l -(a2)
'loop: MOVE.l -(a2),(a1)+
ADDQ.w #4,d6
DBF d7,'loop
MOVE.w d6,!s{tagp}
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'err
MOVE.l #-1,d0
'err: RTS
_muinewobja:
MOVEA.l d1,a0
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'err
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVEA.l d2,a2
'loop: MOVE.l (a2)+,(a1)+
BNE 'loop
MOVE.l !s{tagl},d6
SUBA.l d6,a1
MOVE.w d6,!s{tagp}
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'err
MOVE.l #-1,d0
'err: RTS
._muimakeobj:
MOVE.l d1,-(a7)
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'err
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
ADDQ.w #4,d6
DBF d7,'loop
MOVE.w d6,!s{tagp}
MOVE.l (a7)+,d0
MOVEA.l !s{tagl},a0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'err
MOVE.l #-1,d0
'err: RTS
_muimakeobja:
MOVE.l d1,-(a7)
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'err
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVEA.l d2,a2
'loop: MOVE.l (a2)+,(a1)+
BNE 'loop
MOVE.l !s{tagl},d6
SUBA.l d6,a1
MOVE.w d6,!s{tagp}
MOVE.l (a7)+,d0
MOVEA.l !s{tagl},a0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'err
MOVE.l #-1,d0
'err: RTS
.
._muimacros:
_hvspace:
LEA rectangleclass(pc),a0
SUBA.l a1,a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.l !s{size}
MOVE.w #kind_other,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_hspace:
MOVE.l #MUIO_HSpace,d0
MOVE.l d1,a0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_other,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_vspace:
MOVE.l #MUIO_VSpace,d0
MOVE.l d1,a0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_other,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_string:
MOVE.l d1,d5
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_String,(a1)+
MOVE.l #MUIA_String_MaxLen,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_String_Contents,(a1)+
MOVE.l d5,(a1)+
ADD.w #24,d6
MOVE.w d6,!s{tagp}
LEA stringclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keystring:
MOVE.l d1,d5
MOVEA.l d3,a0
MOVEQ #0,d3
MOVE.b (a0),d3
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_String,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d3,(a1)+
MOVE.l #MUIA_String_MaxLen,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_String_Contents,(a1)+
MOVE.l d5,(a1)+
ADD.w #32,d6
MOVE.w d6,!s{tagp}
LEA stringclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_checkmark:
MOVE.l d1,d5
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_ImageButton,(a1)+
MOVE.l #MUIA_InputMode,(a1)+
MOVE.l #MUIV_InputMode_Toggle,(a1)+
MOVE.l #MUIA_Image_Spec,(a1)+
MOVE.l #MUII_CheckMark,(a1)+
MOVE.l #MUIA_Image_FreeVert,(a1)+
MOVE.l #1,(a1)+
MOVE.l #MUIA_Selected,(a1)+
MOVE.l d5,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_ButtonBack,(a1)+
MOVE.l #MUIA_ShowSelState,(a1)+
MOVE.l #0,(a1)+
ADD.w #56,d6
MOVE.w d6,!s{tagp}
LEA imageclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keycheckmark:
MOVE.l d1,d5
MOVEA.l d2,a0
MOVEQ #0,d2
MOVE.b (a0),d2
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_ImageButton,(a1)+
MOVE.l #MUIA_InputMode,(a1)+
MOVE.l #MUIV_InputMode_Toggle,(a1)+
MOVE.l #MUIA_Image_Spec,(a1)+
MOVE.l #MUII_CheckMark,(a1)+
MOVE.l #MUIA_Image_FreeVert,(a1)+
MOVE.l #1,(a1)+
MOVE.l #MUIA_Selected,(a1)+
MOVE.l d5,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_ButtonBack,(a1)+
MOVE.l #MUIA_ShowSelState,(a1)+
MOVE.l #0,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d2,(a1)+
ADD.w #64,d6
MOVE.w d6,!s{tagp}
LEA imageclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_simplebutton:
MOVE.l d1,str
BSR _freeobj
LEA str(pc),a0
MOVE.l #MUIO_Button,d0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keybutton:
MOVE.l d1,d0
MOVE.l -4(a2),d1
ALibJsr $cf01
MOVE.l d0,d5
MOVEA.l d2,a0
MOVEQ #0,d2
MOVE.b (a0),d2
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_Button,(a1)+
MOVE.l #MUIA_Font,(a1)+
MOVE.l #MUIV_Font_Button,(a1)+
MOVE.l #MUIA_Text_Contents,(a1)+
MOVE.l d5,(a1)+
MOVE.l #MUIA_Text_PreParse,(a1)+
LEA cenc(pc),a0
MOVE.l a0,d0
MOVE.l #4,d1
ALibJsr $cf01
MOVE.l d0,(a1)+
MOVE.l #MUIA_Text_HiChar,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_InputMode,(a1)+
MOVE.l #MUIV_InputMode_RelVerify,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_ButtonBack,(a1)+
ADD.w #64,d6
MOVE.w d6,!s{tagp}
LEA textclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_cycle:
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #20,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l #MUIA_Font,(a1)+
MOVE.l #MUIV_Font_Button,(a1)+
MOVE.l #MUIA_Cycle_Entries,(a1)+
MOVE.l !s{special},(a1)+
ADD.w #16,d6
MOVE.w d6,!s{tagp}
LEA cycleclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_cyclea:
MOVE.l d1,d5
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
CLR.w !s{tagp}
'tlok:
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Font,(a1)+
MOVE.l #MUIV_Font_Button,(a1)+
MOVE.l #MUIA_Cycle_Entries,(a1)+
MOVE.l d5,(a1)+
ADD.w #16,d6
MOVE.w d6,!s{tagp}
LEA cycleclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keycycle:
MOVEA.l d1,a0
MOVEQ #0,d5
MOVE.b (a0),d5
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #20,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
TST.l -(a2)
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l #MUIA_Font,(a1)+
MOVE.l #MUIV_Font_Button,(a1)+
MOVE.l #MUIA_Cycle_Entries,(a1)+
MOVE.l !s{special},(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d5,(a1)+
ADD.w #24,d6
MOVE.w d6,!s{tagp}
LEA cycleclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keycyclea:
MOVEA.l d1,a0
MOVEQ #0,d5
MOVE.b (a0),d5
MOVE.l d2,d4
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
CLR.w !s{tagp}
'tlok:
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Font,(a1)+
MOVE.l #MUIV_Font_Button,(a1)+
MOVE.l #MUIA_Cycle_Entries,(a1)+
MOVE.l d4,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d5,(a1)+
ADD.w #24,d6
MOVE.w d6,!s{tagp}
LEA cycleclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_radio:
MOVE.l d1,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,d4
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #20,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_Group,(a1)+
MOVE.l #MUIA_FrameTitle,(a1)+
MOVE.l d4,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_GroupBack,(a1)+
MOVE.l #MUIA_Radio_Entries,(a1)+
MOVE.l !s{special},(a1)+
ADD.w #32,d6
MOVE.w d6,!s{tagp}
LEA radioclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_radioa:
MOVE.l d1,d4
MOVE.l d2,d5
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok:
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_Group,(a1)+
MOVE.l #MUIA_FrameTitle,(a1)+
MOVE.l d4,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_GroupBack,(a1)+
MOVE.l #MUIA_Radio_Entries,(a1)+
MOVE.l d5,(a1)+
ADD.w #32,d6
MOVE.w d6,!s{tagp}
LEA radioclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keyradio:
MOVE.l d1,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,d4
MOVEA.l d2,a0
MOVEQ #0,d5
MOVE.b (a0),d5
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #20,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
TST.l -(a2)
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_Group,(a1)+
MOVE.l #MUIA_FrameTitle,(a1)+
MOVE.l d4,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_GroupBack,(a1)+
MOVE.l #MUIA_Radio_Entries,(a1)+
MOVE.l !s{special},(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d5,(a1)+
ADD.w #40,d6
MOVE.w d6,!s{tagp}
LEA radioclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keyradioa:
MOVE.l d1,d4
MOVEA.l d2,a0
MOVEQ #0,d5
MOVE.b (a0),d5
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
CLR.w !s{tagp}
'tlok:
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Frame,(a1)+
MOVE.l #MUIV_Frame_Group,(a1)+
MOVE.l #MUIA_FrameTitle,(a1)+
MOVE.l d4,(a1)+
MOVE.l #MUIA_Background,(a1)+
MOVE.l #MUII_GroupBack,(a1)+
MOVE.l #MUIA_Radio_Entries,(a1)+
MOVE.l d3,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d5,(a1)+
ADD.w #40,d6
MOVE.w d6,!s{tagp}
LEA radioclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_slider:
MOVE.l d1,d5
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Numeric_Min,(a1)+
MOVE.l d5,(a1)+
MOVE.l #MUIA_Numeric_Max,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_Numeric_Value,(a1)+
MOVE.l d3,(a1)+
ADD.w #24,d6
MOVE.w d6,!s{tagp}
LEA sliderclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_keyslider:
MOVE.l d1,d5
MOVE.l d4,a0
MOVEQ #0,d4
MOVE.b (a0),d4
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Numeric_Min,(a1)+
MOVE.l d5,(a1)+
MOVE.l #MUIA_Numeric_Max,(a1)+
MOVE.l d2,(a1)+
MOVE.l #MUIA_Numeric_Value,(a1)+
MOVE.l d3,(a1)+
MOVE.l #MUIA_ControlChar,(a1)+
MOVE.l d4,(a1)+
ADD.w #32,d6
MOVE.w d6,!s{tagp}
LEA sliderclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_label:
BSR _freeobj
LEA args(pc),a1
MOVE.l a1,d3
MOVE.l d1,d0
MOVE.l -4(a2),d1
ALibJsr $cf01
MOVE.l d0,(a1)+
MOVE.l d2,(a1)+
MOVE.l #0,(a1)+
MOVEA.l d3,a0
MOVE.l #MUIO_Label,d0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_label,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_numbutton: ;MUIObject,&format$,min,max (a3,d1,d2,d3)
BSR _freeobj
MOVEQ #0,d0
LEA args(pc),a0
MOVE.l a0,d5
MOVE.l #0,(a0)+
MOVE.l d2,(a0)+
MOVE.l d3,(a0)+
MOVE.l d1,d0
MOVE.l -4(a2),d1
ALibJsr $cf01
MOVE.l d0,(a0)+
MOVE.l #0,(a0)+
MOVEA.l d5,a0
MOVE.l #MUIO_NumericButton,d0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_list: ;d1=max d2=col d3=f$
MOVEQ #0,d0
MOVE.l d1,d4
MOVE.l d3,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,d3
MOVEQ #0,d0
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l d4,d0
ADDQ.l #1,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
CMP.l #1,d2
BLE 'nocol
MOVE.l #MUIA_List_DisplayHook,(a1)+
ADD.l #7,d2
LSL #2,d2
MOVE.w d2,!s{spe2size}
MOVE.l d2,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{spe2}
BEQ 'noobj
LEA DHook(pc),a0
MOVE.l a1,-(a7)
MOVEA.l d0,a1
'looph: MOVE.l (a0)+,(a1)+
BNE 'looph
MOVE.l #SizeOf.Hook,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,a0
BEQ 'noobj
MOVE.l !s{spe2},SizeOf.Hook\h_Entry(a0)
MOVEA.l (a7)+,a1
MOVE.l a0,(a1)+
ADDQ.w #8,d6
'nocol: MOVE.l #MUIA_List_Format,(a1)+
MOVE.l d3,(a1)+
MOVE.l #MUIA_List_SourceArray,(a1)+
MOVE.l !s{special},(a1)+
ADD.w #16,d6
MOVE.w d6,!s{tagp}
LEA listclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
_lista: ;d1=max d2=col d3=f$ d4=*array
MOVE.l d1,d5
MOVE.l d3,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,d3
MOVEQ #0,d0
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
CLR.w !s{tagp}
'tlok:
MOVE.l d5,d0
ADDQ.l #1,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
CMP.l #1,d2
BLE 'nocol
MOVE.l #MUIA_List_DisplayHook,(a1)+
ADD.l #7,d2
LSL #2,d2
MOVE.w d2,!s{spe2size}
MOVE.l d2,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{spe2}
BEQ 'noobj
LEA DHook(pc),a0
MOVE.l a1,-(a7)
MOVEA.l d0,a1
'looph: MOVE.l (a0)+,(a1)+
BNE 'looph
MOVE.l #SizeOf.Hook,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,a0
BEQ 'noobj
MOVE.l !s{spe2},SizeOf.Hook\h_Entry(a0)
MOVEA.l (a7)+,a1
MOVE.l a0,(a1)+
ADDQ.w #8,d6
'nocol: MOVE.l #MUIA_List_Format,(a1)+
MOVE.l d3,(a1)+
MOVE.l #MUIA_List_SourceArray,(a1)+
MOVE.l d4,(a1)+
ADD.w #16,d6
MOVE.w d6,!s{tagp}
LEA listclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
_listb: ;d1=max d2=col d3=f$
MOVE.l d1,d4
MOVE.l d3,d0
MOVE.l -(a2),d1
ALibJsr $cf01
MOVE.l d0,d3
MOVEQ #0,d0
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
CLR.w !s{tagp}
'tlok:
MOVE.l d4,d0
ADDQ.l #1,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
CMP.l #1,d2
BLE 'nocol
MOVE.l #MUIA_List_DisplayHook,(a1)+
ADD.l #7,d2
LSL #2,d2
MOVE.w d2,!s{spe2size}
MOVE.l d2,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{spe2}
BEQ 'noobj
LEA DHook(pc),a0
MOVE.l a1,-(a7)
MOVEA.l d0,a1
'looph: MOVE.l (a0)+,(a1)+
BNE 'looph
MOVE.l #SizeOf.Hook,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,a0
BEQ 'noobj
MOVE.l !s{spe2},SizeOf.Hook\h_Entry(a0)
MOVEA.l (a7)+,a1
MOVE.l a0,(a1)+
ADDQ.w #8,d6
'nocol: MOVE.l #MUIA_List_Format,(a1)+
MOVE.l d3,(a1)+
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
LEA listclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
_listview:
MOVEQ #0,d0
TST.l !u{adr}
BEQ 'noobj
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #MUIA_Listview_List,(a1)+
MOVE.l !u{adr},(a1)+
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
LEA listviewclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
_popbutton:
BSR _freeobj
MOVEQ #0,d0
LEA args(pc),a0
MOVE.l a0,d5
MOVE.l d1,(a0)+
MOVE.l #0,(a0)+
MOVEA.l d5,a0
MOVE.l #MUIO_PopButton,d0
!CALLMUI {MUI_MakeObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
CLR.l !s{tagl}
CLR.w !s{size}
MOVE.w #kind_gadget,!s{kind}
MOVE.l #-1,d0
'noobj: RTS
_imagebutton:
MOVEQ #0,d0
TST.l 0(a0)
BEQ 'noobj
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #SizeOf.Image,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a2
MOVE.l (a0),4(a2)
MOVE.w 4(a0),8(a2)
MOVE.l 14(a0),10(a2)
MOVE.b #8,14(a2)
MOVE.l #MUIA_Image_OldImage,(a1)+
MOVE.l !s{special},(a1)+
ADD.w #8,d6
MOVE.w d6,!s{tagp}
LEA imageclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
.
._addobjhgroup:
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
MOVE.l #MUIA_Group_Horiz,(a1)+
MOVE.l #1,(a1)+
MOVE.w #8,!s{tagp}
MOVEA.l d0,a1
'tlok: TST.l !t{adr}
BEQ 'noobj
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #Child,(a1)+
MOVE.l !t{adr},(a1)
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
MOVE.l #-1,d0
'noobj: RTS
._createhgroup:
MOVEQ #0,d0
TST.l !s{tagl}
BEQ 'noobj
LEA groupclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
._addobjvgroup:
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: TST.l !t{adr}
BEQ 'noobj
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #Child,(a1)+
MOVE.l !t{adr},(a1)
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
MOVE.l #-1,d0
'noobj: RTS
._createvgroup:
MOVEQ #0,d0
TST.l !s{tagl}
BEQ 'noobj
LEA groupclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
._addobjpage:
MOVEA.l !s{tagl},a1
TST.l !s{tagl}
BNE 'tlok
MOVE.l maxt(pc),d0
LSL #2,d0
MOVE.w d0,!s{size}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $C002
MOVE.l d0,!s{tagl}
BEQ 'noobj
MOVEA.l d0,a1
CLR.w !s{tagp}
'tlok: TST.l !t{adr}
BEQ 'noobj
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #Child,(a1)+
MOVE.l !t{adr},(a1)
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
MOVE.l #-1,d0
'noobj: RTS
._createpage:
MOVEQ #0,d0
TST.l !s{tagl}
BEQ 'noobj
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.w #20,d0
LSL.w #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $c002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l #MUIA_Register_Titles,(a1)+
MOVE.l !s{special},(a1)+
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
LEA registerclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
_createpagea:
MOVEQ #0,d0
TST.l !s{tagl}
BEQ 'noobj
MOVE.l d1,d3
MOVE.l #20,d0
LSL #2,d0
MOVE.w d0,!s{spesize}
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $c002
MOVE.l d0,!s{special}
BEQ 'noobj
MOVEA.l d0,a0
MOVEA.l d3,a2
'loop: MOVE.l (a2)+,a1
MOVE.l a1,d0
MOVEQ #-1,d1
'loops: ADDQ #1,d1
TST.b (a1)+
BNE 'loops
ALibJsr $cf01
MOVE.l d0,(a0)+
BNE 'loop
MOVEA.l !s{tagl},a1
MOVE.w !s{tagp},d6
ADDA.w d6,a1
MOVE.l #0,(a0)+
MOVE.l #MUIA_Register_Titles,(a1)+
MOVE.l !s{special},(a1)+
ADDQ.w #8,d6
MOVE.w d6,!s{tagp}
LEA registerclass(pc),a0
MOVEA.l !s{tagl},a1
!CALLMUI {MUI_NewObjectA}
MOVE.l d0,!s{adr}
BEQ 'noobj
MOVE.l #-1,d0
'noobj: RTS
.
._insertsingle:
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
MOVE.l d1,d4
CMP.w #1,d7
BGT 'col
MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,d2
BRA 'nocol
'col: MOVE.w d7,d0
ADDQ #1,d0
LSL #2,d0
MOVE.l #MEMF_PUBLIC|MEMF_CLEAR,d1
ALibJsr $c002
MOVE.l d0,d2
BEQ 'noobj
MOVEA.l d2,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
'nocol: MOVE.l !s{adr},d0
LEA args(pc),a0
MOVE.l a0,d1
MOVE.l #MUIM_List_InsertSingle,(a0)+
MOVE.l d2,(a0)+
MOVE.l d4,(a0)+
MOVE.l #0,(a0)+
BSR _domethoda
'noobj: RTS
_insertsinglea:
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
MOVE.l d1,d4
MOVE.l !s{adr},d0
LEA args(pc),a0
MOVE.l a0,d1
MOVE.l #MUIM_List_InsertSingle,(a0)+
MOVE.l d2,(a0)+
MOVE.l d4,(a0)+
MOVE.l #0,(a0)+
BSR _domethoda
'noobj: RTS
._removesingle:
MOVEQ #0,d0
MOVE.l !s{adr},d0
BEQ 'noobj
LEA args(pc),a0
MOVE.l a0,d2
MOVE.l #MUIM_List_Remove,(a0)+
MOVE.l d1,(a0)+
MOVE.l #0,(a0)+
MOVE.l d2,d1
BSR _domethoda
'noobj: RTS
._redrawsingle:
MOVEQ #0,d0
MOVE.l !s{adr},d0
BEQ 'noobj
LEA args(pc),a0
MOVE.l a0,d2
MOVE.l #MUIM_List_Redraw,(a0)+
MOVE.l d1,(a0)+
MOVE.l #0,(a0)+
MOVE.l d2,d1
BSR _domethoda
'noobj: RTS
._listtitle:
MOVE.l a6,_IntuiBase
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
CMP.w #1,d7
BGT 'col
MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,d2
MOVE.l !s{adr},d0
MOVE.l #MUIA_List_Title,d1
BSR _set
BRA 'noobj
'col: MOVEA.l !s{spe2},a0
ADDA.l #24,a0
SUBQ #1,d7
'loop: MOVE.l -(a2),d1
MOVE.l -(a2),d0
ALibJsr $cf01
MOVE.l d0,(a0)+
DBF d7,'loop
MOVE.l #0,(a0)+
MOVE.l !s{adr},d0
MOVE.l #MUIA_List_Title,d1
MOVEQ.l #1,d2
BSR _set
'noobj: RTS
_listtitlea:
MOVE.l a6,_IntuiBase
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
MOVEA.l !s{spe2},a0
ADDA.l #24,a0
MOVEA.l d1,a1
'loop: MOVE.l (a1)+,(a0)+
BNE 'loop
MOVE.l #0,(a0)+
MOVE.l !s{adr},d0
MOVE.l #MUIA_List_Title,d1
MOVEQ.l #1,d2
BSR _set
'noobj: RTS
.
._muiset:
TST !s{adr}
BEQ 'noobj
MOVEA.l !s{adr},a0
LEA args(pc),a1
MOVE.l a1,d0
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
DBF d7,'loop
MOVE.l #0,(a1)+
MOVEA.l d0,a1
JSR -648(a6)
'noobj: RTS
_muiseta:
TST !s{adr}
BEQ 'noobj
MOVEA.l !s{adr},a0
MOVEA.l d1,a1
JSR -648(a6)
'noobj: RTS
._muiget:
MOVEA.l !s{adr},a0
MOVE.l d1,d0
LEA stp(pc),a1
JSR -654(a6)
MOVE.l stp(pc),d0
'noobj: RTS
.
._dmethod:
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
MOVE.l !s{adr},d0
LEA args(pc),a1
MOVE.l a1,d3
MOVE.l d1,(a1)+
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
DBF d7,'loop
MOVE.l d3,d1
BSR _domethoda
'noobj: RTS
_dmethoda:
MOVEQ #0,d0
TST.l !s{adr}
BEQ 'noobj
MOVE.l !s{adr},d0
LEA args(pc),a1
MOVE.l a1,d3
MOVE.l d1,(a1)+
MOVE.l d2,a2
'loop: MOVE.l (a2)+,(a1)+
BNE 'loop
MOVE.l d3,d1
BSR _domethoda
'noobj: RTS
._notify:
TST.l !s{adr}
BEQ 'noobj
TST.l !u{adr}
BEQ 'noobj
LEA args(pc),a1
MOVE.l a1,d3
MOVE.l #MUIM_Notify,(a1)+
MOVE.l d1,(a1)+
MOVE.l d2,(a1)+
MOVE.l !u{adr},(a1)+
MOVE.w #0,(a1)+
MOVE.w d7,(a1)+
SUBQ #1,d7
'loop: MOVE.l -(a2),(a1)+
DBF d7,'loop
MOVE.l d3,d1
MOVE.l !s{adr},d0
BSR _domethoda
'noobj: RTS
_notifya:
TST.l !s{adr}
BEQ 'noobj
TST.l !u{adr}
BEQ 'noobj
LEA args(pc),a1
MOVE.l a1,d3
MOVE.l #MUIM_Notify,(a1)+
MOVE.l d1,(a1)+
MOVE.l d2,(a1)+
MOVE.l !u{adr},(a1)+
MOVEA.l d4,a2
MOVEQ #-1,d7
'loop1: ADDQ #1,d7
TST.l (a2)+
BNE 'loop1
MOVE.l d7,(a1)+
MOVEA.l d4,a2
'loop2: MOVE.l (a2)+,(a1)+
BNE 'loop2
MOVE.l d3,d1
MOVE.l !s{adr},d0
BSR _domethoda
'noobj: RTS
._event:
TST.l appaddr
BEQ 'noapp
MOVE.l appaddr(pc),d0
LEA args(pc),a0
MOVE.l a0,d1
MOVE.l #MUIM_Application_NewInput,(a0)+
LEA sigs(pc),a1
MOVE.l a1,(a0)+
BSR _domethoda
'noapp: RTS
._waitevent:
TST.l appaddr
BEQ 'noapp
MOVE.l sigs(pc),d0
BEQ 'nosigs
MOVE.l 4,a6
JSR -318(a6)
'nosigs:BRA _event
'noapp: RTS
.
._freeobj:
MOVEM.l d0-d1/a1,-(a7)
MOVE.l !s{size},d0
BEQ 'notl
MOVE.l !s{tagl},d1
BEQ 'notl
MOVEA.l d1,a1
ALibJsr $c003
'notl: MOVE.l !s{spesize},d0
BEQ 'nospe
MOVE.l !s{special},d1
BEQ 'nospe
MOVEA.l d1,a1
ALibJsr $c003
'nospe: MOVE.l !s{spe2size},d0
BEQ 'nospe2
MOVE.l !s{spe2},d1
BEQ 'nospe2
MOVEA.l d1,a1
ALibJsr $c003
'nospe2:MOVEM.l (a7)+,d0-d1/a1
RTS
_domethoda: ;DoMethodA(obj,msg)(d0/d1)
TST.l d0
BEQ.b cmnullreturn
MOVE.l d0,a2
MOVE.l d1,a1
MOVE.l -4(a2),a0
cminvoke:
PEA.l cmreturn(pc)
MOVE.l 8(a0),-(a7)
RTS
cmnullreturn:
MOVEQ #0,d0
cmreturn:
RTS
_set: ;set(obj,attr,value)(d0/d1/d2)
MOVEM.l a0-a1/a6,-(a7)
MOVEA.l _IntuiBase(pc),a6
MOVEA.l d0,a0
LEA args(pc),a1
MOVE.l a1,d0
MOVE.l d1,(a1)+
MOVE.l d2,(a1)+
MOVE.l #0,(a1)+
MOVE.l d0,a1
JSR -648(a6)
MOVEM.l (a7)+,a0-a1/a6
RTS
Even
DHook:
Dc.l $b3fc0000,$00006706
Dc.l $24d966fc,$600843fa
Dc.l $000824d9,$66fc4e75
Dc.l 0,0
Even
_MUIBase: Dc.l 0
_IntuiBase: Dc.l 0
s0: Dc.l 0
s1: Dc.l 0
s2: Dc.l 0
tits: Dc.l 0
stp: Dc.l 0
sigs: Dc.l 0
str: Dc.l 0,0
args: Dcb.l 40,0
temp: Dcb.l 20,0
Even
appstruct:
appaddr: Dc.l 0
appkind: Dc.w 4
apptags: Dc.l 0
apptap: Dc.w 0
appsize: Dc.w 160
appspecial: Dc.l 0
appspesize: Dc.w 0
Even
;************************************************************
;* ERRORS *
;************************************************************
.
.errors:
err1: MOVEQ.l #1,d0
TRAP #0
Even
initerr:
MOVE.l #MUI_INIT_ERR,d0
TRAP #0
Even
MUI_INIT_ERR:
Dc.b "MUILib INIT ERROR!!!",0
Even
;************************************************************
;* DATAS *
;************************************************************
maxt: Dc.l 31
cenc: Dc.b $1B,$63,$00,$1B
Even
appclass: Dc.b "Application.mui",0
winclass: Dc.b "Window.mui",0
groupclass: Dc.b "Group.mui",0
imageclass: Dc.b "Image.mui",0
rectangleclass: Dc.b "Rectangle.mui",0
stringclass: Dc.b "String.mui",0
textclass: Dc.b "Text.mui",0
cycleclass: Dc.b "Cycle.mui",0
radioclass: Dc.b "Radio.mui",0
sliderclass: Dc.b "Slider.mui",0
registerclass: Dc.b "Register.mui",0
listclass: Dc.b "List.mui",0
listviewclass: Dc.b "Listview.mui",0
Even